﻿@model IEnumerable<Tradukisto.Model.Special.SimpleLocal>
<div class="translationHolder">
    <table>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.Culture)
            </th>
            <th class="translationTh">
                @Html.DisplayNameFor(model => model.Value)
            </th>
            <th></th>
        </tr>

        @foreach (var item in Model)
        {    
            <tr class="translationRow">
                @using (Ajax.BeginForm("SaveTranslation", new AjaxOptions { HttpMethod = "POST", OnSuccess = "successTranslate" }))
                { 
                    <td style="vertical-align: middle;">
                        @Html.HiddenFor(modelItem => item.Id)
                        @Html.DisplayFor(modelItem => item.Culture)
                    </td>
                    <td style="vertical-align: middle;">
                        @Html.EditorFor(modelItem => item.Value)
                    </td>
                    <td style="vertical-align: middle;">
                        <button type="submit">Save</button><i class="icon-ok-sign saveTranslationSuccess"></i>
                    </td>
                }
            </tr>
        }
    </table>
</div>
